<ul class="nav">
    <li><span id="myname"><i class="icon-user"></i> 首页&nbsp;<i class="icon-angle-right"></i>&nbsp;</span></li>

    <?php foreach($sub as $key => $value): ?>
        <?php if( ! isset($value[0])): ?>
            <li <?php if($current = (CURRENT_SID == $value['id'])) echo 'class="active"'; ?>>
                <a id="submenuindex" target="" href="<?php echo URL::to($value['module'].'/'.$value['class'].'/'.$value['action']);?>"><?php echo $value['name'];?></a>
            </li>
        <?php else: ?>
            <li>
                <a href="javascript:showDropMenuSelf('currentItem<?php echo $value[0]['id']; ?>', 'dropMenu<?php echo $value[0]['id']; ?>')" id="currentItem<?php echo $value[0]['id']; ?>">
                    <?php echo $value[0]['name']; ?> <span class="icon-caret-down"></span>
                </a>
                <div id="dropMenu<?php echo $value[0]['id']; ?>" class="dropMenu">
                    <input type="text" placeholder="搜索" onkeyup="searchItemsSelf(this.value)" value="" id="search" class="form-control">
                    <div id="searchResult">
                        <div id="defaultMenu">
                            <ul>
                                <?php foreach($value as $key1 => $value1): ?>
                                <li>
                                    <a href="<?php echo URL::to($value1['module'].'/'.$value1['class'].'/'.$value1['action']);?>"><i class="icon-cube"></i> <?php echo $value1['name'];?></a>
                                </li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </li>
        <?php endif; ?>
    <?php endforeach; ?>
    <?php echo HTML::submr();?>
</ul>